package net.huashitong.question.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.question.entity.TaskRecord;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class TaskRecordDao extends StringDao<TaskRecord> {

    /**
     * 任务id 获取所有完成情况
     * @param taskid
     * @return
     */
    public List<TaskRecord> getResDeptRecordsbyId(String taskid)
    {
        GenericQuery query  = createQuery("t");
        query.append("and t.taskId=:taskId").setParam("taskId",taskid);
        return query.listResult();
    }
}